<template>
  <div class="home">
    <Goods :tableData="tableData"></Goods>
  </div>
</template>

<script>
// @ is an alias to /src
import Goods from '@/components/Goods.vue'

export default {
  name: 'Home',
  components: {
    Goods
  },
  data() {
    return {
      tableData: [
        {
          date: '2016-05-03',
          name: 'Tom',
          state: 'California',
          city: 'Los Angeles',
          address: 'No. 189, Grove St, Los Angeles',
          zip: 'CA 90036',
          tag: 'Home',
        },
        {
          date: '2016-05-02',
          name: 'Tom',
          state: 'California',
          city: 'Los Angeles',
          address: 'No. 189, Grove St, Los Angeles',
          zip: 'CA 90036',
          tag: 'Office',
        },
        {
          date: '2016-05-04',
          name: 'Tom',
          state: 'California',
          city: 'Los Angeles',
          address: 'No. 189, Grove St, Los Angeles',
          zip: 'CA 90036',
          tag: 'Home',
        },
        {
          date: '2016-05-01',
          name: 'Tom',
          state: 'California',
          city: 'Los Angeles',
          address: 'No. 189, Grove St, Los Angeles',
          zip: 'CA 90036',
          tag: 'Office',
        },
      ],
    }
  },
  created() {
    this.axios.get('/api/goods/getall').then((response) => {
        // this.tableData = response
        console.log(response.data)
      })
    // this.tableData = ;
  }
}
</script>
